import { defineStore } from 'pinia'
import { getBoardTypes } from '@/services/board.service'
import { ref } from 'vue'

export const useCommonState = defineStore('common', () => {
  const types = ref<BoardType[]>([])
  const initData = async () => {
    const res = await getBoardTypes()
    types.value = res.list
  }
  return {
    types,
    initData
  }
})
